package com.gec.hawaste.controller;


import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gec.hawaste.entity.SysUser;
import com.gec.hawaste.service.ISysUserService;
import com.gec.hawaste.utils.ResultBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * <p>
 * 用户表 前端控制器
 * </p>
 *
 * @author gec
 * @since 2022-11-23
 */
@RestController
@RequestMapping("/manager/user")
public class SysUserController {
    @Autowired
    ISysUserService sysUserService;

    @RequestMapping("/selectByRid/{id}")
    public ResultBean<List<SysUser>> select(@PathVariable Long id) {
        return ResultBean.ok(sysUserService.selectByRid(id));
    }

    @RequestMapping("selectNoRole/{rid}/{oid}")
    public ResultBean selectNoRole(@PathVariable("rid") Long rid, @PathVariable("oid") Long oid) {
        return ResultBean.ok(sysUserService.selectNoRole(rid, oid));
    }
}
